// pages/shiye/components/menu-popup/menu-popup.ts
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    visible: {
      type: Boolean,
      default: false,
    },
  },

  /**
   * 组件的初始数据
   */
  data: {
    menuList: [
      // {
      //   title: "尽调报告",
      //   path: "/pages/shiye/shiye",
      //   img: "../../../../static/images/shiye/report-menu.png",
      // },
      {
        title: "人工客服",
        path: "/pages/mine/subpages/contactus/contactus",
        img: "../../../../static/images/shiye/service-menu.png",
      },
    ],
  },

  /**
   * 组件的方法列表
   */
  methods: {
    onVisibleChange(e: any) {
      this.setData({
        visible: e.detail.visible,
      });
    },
    gotoDetail(e: any) {
      const url = e.currentTarget.dataset.path;
      this.setData({
        visible: false,
      });
      if (url === "/pages/shiye/shiye") {
        wx.switchTab({ url: url });
      } else {
        wx.navigateTo({ url: url });
      }
    },
  },
});
